package hoan.nguyen;

import hoan.nguyen.bean.GoodbyeWorld;
import hoan.nguyen.bean.HelloWorld;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;



/**
 * Hello world!
 *
 */
public class Main 
{
    public static void main( String[] args )
    {
    	ApplicationContext context = 
                new ClassPathXmlApplicationContext("Beans.xml");

         HelloWorld helloWorld = (HelloWorld) context.getBean("helloWorld");
         GoodbyeWorld goodbyeWorld = (GoodbyeWorld) context.getBean("goodbyeWorld");

         System.out.println(helloWorld.getMessage()); 
         System.out.println(goodbyeWorld.getLastWorld()); 
    }
}
